Translating Out of Static Single Assignment Form
نویسندگان
چکیده
Programs represented in Static Single Assignment (SSA) form contain phi instructions (or functions) whose operational semantics are to merge values coming from distinct control flow paths. However, translating phi instructions into native instructions is nontrivial when transformations such as copy propagation and code motion have been performed. In this paper we present a new framework for translating out of SSA form. By appropriately placing copy instructions, we ensure that none of the resources in a phi congruence class interfere. Within our framework, we propose three methods for copy placement. The first method pessimistically places copies for all operands of phi instructions. The second method uses an interference graph to guide copy placement. The third method uses both data flow liveness sets and an interference graph to guide copy placement. We also present a new SSAbased coalescing method that can selectively remove redundant copy instructions with interfering operands. Our experimental results indicate that the third method results in 35% fewer copy instructions than the second method. Compared to the first method, the third method, on average, inserts 89.9% fewer copies during copy placement and runs 15% faster, which are significant reductions in compilation time and space.
منابع مشابه
Translating Out of Predicated Static Single Assignment Form
Static Single Assignment (SSA) form is an intermediate representation that allows a compiler to perform advanced optimizations to extract parallelism. Predication is an architectural feature to maximize instruction level parallelism. If a compiler uses a predicated SSA form that is a combination of an SSA form and predication as an intermediate representation, it can perform advance optimizatio...
متن کاملOptimizing Storage Size for Static Control Programs in Automatic Parallelizers
This article deals with automatic parallelization of static control programs. During the parallelization process the removal of arti-cial dependences is usually realized by translating the original program into a single assignment form. This total data expansion has a very high memory cost. We present a technique of partial data expansion which leaves untouched the performances of the paralleli...
متن کاملOptimizing the translation out-of-SSA with renaming constraints
Static Single Assignment form is an intermediate representation, that uses -functions to merge values at each confluent points of the control flow graph. functions are not machine instructions and should be renamed back to move operations when translating out-of-SSA form. Without a coalescing algorithm, out-of-SSA translation generates many move instructions. In this paper we propose an extensi...
متن کاملStatic single information from a functional perspective
Static single information form is a natural extension of the well-known static single assignment form. It is a program intermediate representation used in optimising compilers for imperative programming languages. In this paper we show how a program expressed in static single information form can be transformed into an equivalent program in functional notation. We also examine the implications ...
متن کاملTask Static Single Assignment (T-SSA) and Its Use in Safe Program Parallelization (short paper)
The mechanism of copy-on-write is recently used in speculative and deterministic parallel systems. In these systems, copy-on-write happens when a task modifies a variable for the first time. At the program level, the copying is a form of renaming. This paper extends the formalism of static single assignment (SSA) to introduce a program representation called task static single assignment (T-SSA)...
متن کامل